﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String url = request.getScheme() + "://" + request.getServerName()
			+ request.getRequestURI();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<title>打印设置</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<%@ include file="/html/custom/header.jsp"%>
		<link type="text/css" href="<%=basePath%>/html/css/gm/user.css"
			rel="stylesheet" />
		<script type="text/javascript"
			src="<%=basePath%>html/js/swss.asset.sys.js"></script>
		<script type="text/javascript">
			var res={code:<s:property value="#request.code" />,msg:"<s:property value="#request.msg"  />"};
		</script>
		<style>
        .td-op {
	    width: 280px;
         }
   </style>
	</head>
	<body>
		<!-- 导航 -->
		<s:action name="showTopNav" executeResult="true" namespace="/user"></s:action>
		<!-- /导航 -->

		<div id="content">
			<!-- 单条删除辅助html -->
			<%@ include file="/html/custom/formDel.jsp"%>
			<form id="statesForm" action="/swss/sys/updatePrint.action" method="post">

				<!-- toolbar -->
				<div class="toolbar">
					<span id="btnset" class="btnset"><input type="submit"
							value="保 存" /> </span>
				</div>
				<!-- 数据表通用格式 -->

				<div class="datagird">
					<table class="ui-widget ui-widget-content">
						<thead>
							<tr class="ui-widget-header ">
								<th>
									打印类型
								</th>
								<th>
									样式选项
								</th>
								<th>
									样式预览
								</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>
									条码
								</td>
								<td>
									<select onchange="selChange(this);" name="barCode">
										<option value="barCode1"
											<s:if test="#request.barCode=='barCode1'"> selected="selected" </s:if>>
											类型1
										</option>
										<option value="barCode2"
											<s:if test="#request.barCode=='barCode2'"> selected="selected" </s:if>>
											类型2
										</option>
									</select>
								</td>
								<td>
									<img id="barCodeImg"
										<s:if test="#request.barCode=='barCode1'"> src="html/images/Tm_1.jpg" </s:if>
										<s:if test="#request.barCode=='barCode2'"> src="html/images/Tm_2.jpg" </s:if> />
								</td>

							</tr>
							<tr>
								<td>
									验收单
								</td>
								<td>
									<select name="accDoc">
										<option value="accDoc3"
											<s:if test="#request.accDoc=='accDoc3'"> selected="selected" </s:if>>
											A4纸
										</option>
										<option value="accDoc4"
											<s:if test="#request.accDoc=='accDoc4'"> selected="selected" </s:if>>
											拉杆纸
										</option>
									</select>
								</td>
								<td>
									<img src="html/images/ysd_2.jpg" />
								</td>

							</tr>
						</tbody>
					</table>
				</div>

			</form>
		</div>
		<div id="loading"></div>
		<div id="mask"></div>
		<div id="msg"></div>
	<script type="text/javascript">
	   var barCodeImg = document.getElementById("barCodeImg");
	   function selChange(obj) {
		for ( var i = 0; i < obj.length; i++) {
			if (obj[i].selected) {
				if (obj[i].value == "barCode1") {
					barCodeImg.src = "html/images/Tm_1.jpg";
				}
				if (obj[i].value == "barCode2") {
					barCodeImg.src = "html/images/Tm_2.jpg";
				}
			}
		}
	}
  </script>
	</body>
</html>
